<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1">
  <head>
    <meta charset="utf-8"/>
    <title>Tahoe-LAFS - Welcome</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Tahoe-LAFS is a free and open distributed storage system"/>
    <meta name="author" content="Tahoe-LAFS"/>

    <!-- Le styles -->
    <link href="/css/bootstrap.css" rel="stylesheet"/>
    <link href="/css/new-tahoe.css" rel="stylesheet"/>

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="/icon.png" />
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="brand" href="/"><img src="/img/logo.png" alt="Tahoe-LAFS"/></a>
          <table class="node-info pull-right">
            <tr>
              <th>Nickname:</th>
              <td t:render="my_nickname" />
            </tr>
            <tr>
              <th>Node ID:</th>
              <td t:render="my_nodeid" />
            </tr>
          </table>
        </div>
      </div>
    </div>

    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span3">
          <div class="well sidebar-nav nav">
             <div class="nav-header">Open Tahoe-URI:</div>
             <div class="nav-form">
               <form action="uri" method="get" enctype="multipart/form-data">
                 <input type="text" name="uri" />
                 <p><input type="submit" class="btn" value="View File or Directory &#187;" /></p>
               </form>
            </div>
            <hr/>

            <div class="nav-header">Download Tahoe-URI:</div>
            <div class="nav-form">
              <form action="uri" method="get" enctype="multipart/form-data">
                <label for="download-uri">
                  URI
                  <input type="text" name="uri" />
                </label>
                <label for="download-filename">
                  Filename
                  <input type="text" name="filename" />
                </label>
                <input type="hidden" name="save" value="true"/>
                <p><input type="submit" class="btn" value="Download File &#187;" /></p>
              </form>
            </div>
            <hr/>

            <div class="nav-header">Upload File</div>
            <div class="nav-form">
              <form action="uri" method="post" enctype="multipart/form-data">
                <input type="file" class="freeform-input-file" name="file" />
                <input type="hidden" name="t" value="upload" />

                <label for="upload-chk" class="radio">
                  <input type="radio" checked="checked" id="upload-chk" value="chk" name="format" />
                  Immutable
                </label>

                <label for="upload-sdmf" class="radio">
                  <input type="radio" id="upload-sdmf" value="sdmf" name="format" />
                  <acronym title="Small Distributed Mutable File">SDMF</acronym>
                </label>

                <label for="upload-mdmf" class="radio">
                  <input type="radio" id="upload-mdmf" value="mdmf" name="format" />
                  <acronym title="Medium Distributed Mutable File">MDMF</acronym> (experimental)
                </label>

                <p><input type="submit" class="btn" value="Upload File &#187;" /></p>
              </form>
            </div>
            <hr/>

            <div class="nav-header">Create Directory</div>
            <div class="nav-form">
              <form action="uri" method="post" enctype="multipart/form-data">
                <label for="mkdir-sdmf" class="radio">
                  <input type="radio" checked="checked" id="mkdir-sdmf" value="sdmf" name="format" />
                  <acronym title="Small Distributed Mutable File">SDMF</acronym>
                </label>

                <label for="mkdir-mdmf" class="radio">
                  <input type="radio" id="mkdir-mdmf" value="mdmf" name="format" />
                  <acronym title="Medium Distributed Mutable File">MDMF</acronym> (experimental)
                </label>

                <input type="hidden" name="t" value="mkdir" />
                <input type="hidden" name="redirect_to_result" value="true" />
                <input type="submit" class="btn" value="Create a directory &#187;" />
              </form>
            </div>

          </div><!--/.well -->
          <div class="well sidebar-nav">
            <div class="nav-header">
              <ul class="nav nav-list">
                <li class="nav-header">Tools</li>
                <li><a href="status">Recent and Active Operations</a></li>
                <li><a href="statistics">Operational Statistics</a></li>
              </ul>
            </div>
            <hr/>
            <div class="nav-header">
              <ul class="nav nav-list">
                <li class="nav-header">Save incident report</li>
                <li><div t:render="incident_button" /></li>
              </ul>
            </div>
          </div><!--/.well -->
        </div><!--/span-->
        <div class="span9">
          <div style="margin-bottom: 16px">
            <h1 style="font-size: 48px">Grid Status</h1>
          </div>
          <div class="grid-status">
            <div class="row-fluid">
              <div class="span6">
                <div>
                  <h3>
                    <div class="status-indicator">
                      <img>
                        <t:attr name="src">img/connected-<t:transparent t:render="connected_to_at_least_one_introducer" />.png</t:attr>
                        <t:attr name="alt"><t:transparent t:render="connected_to_at_least_one_introducer_alt" /></t:attr>
                      </img>
                    </div>
                    <div t:render="introducer_description" />
                  </h3>
                </div>
                <div>
                  <h3>
                    <div class="status-indicator">
                      <img>
                        <t:attr name="src">img/connected-<t:transparent t:render="connected_to_helper" />.png</t:attr>
                        <t:attr name="alt"><t:transparent t:render="connected_to_helper_alt" /></t:attr>
                      </img>
                    </div>
                    <div t:render="helper_description" />
                  </h3>
                  <div class="furl" t:render="helper_furl_prefix" />
                </div>
              </div><!--/span-->
              <div class="span6">
                <div class="span4 services">
                  <h3>Services</h3>
                  <div t:render="services" />
                </div><!--/span-->
              </div><!--/span-->
            </div><!--/row-->
          </div>

          <div class="row-fluid">
            <h2>
              Connected to <span t:render="connected_storage_servers" />
              of <span t:render="known_storage_servers" /> known storage servers
            </h2>
          </div><!--/row-->

          <!-- table with storage service connection status -->
          <table class="table table-striped table-bordered peer-status" t:render="services_table">
            <thead>
              <tr t:render="header">
                <td><h3>Nickname</h3></td>
                <td><h3>Connection</h3></td>
                <td><h3>Last RX</h3></td>
                <td><h3>Version</h3></td>
                <td><h3>Available</h3></td>
              </tr>
            </thead>
            <tr t:render="item">
              <!-- Nickname -->
              <td class="nickname-and-peerid">
                <div class="status-indicator">
                  <img>
                    <t:attr name="src">img/connected-<t:slot name="service_connection_status" />.png</t:attr>
                    <t:attr name="alt"><t:slot name="service_connection_status_alt" /></t:attr>
                  </img>
                </div>
                <div class="nickname"><t:slot name="nickname"/></div>
                <div class="nodeid"><t:slot name="peerid"/></div>
              </td>
              <!-- Connection -->
              <td class="connection-status">
                <t:attr name="title"><t:slot name="details"/></t:attr>
                <t:slot name="summary"/>
                <a class="timestamp">
                  <t:attr name="title"><t:slot name="service_connection_status_abs_time"/></t:attr>
                  <t:slot name="service_connection_status_rel_time"/>
                </a>
              </td>
              <!-- Last RX -->
              <td class="service-last-received-data">
                <a class="timestamp">
                  <t:attr name="title"><t:slot name="last_received_data_abs_time"/></t:attr>
                  <t:slot name="last_received_data_rel_time"/>
                </a>
              </td>
              <!-- Version -->
              <td class="service-version">
                <t:slot name="version"/>
              </td>
              <!-- Available -->
              <td class="service-available-space">
                <t:slot name="available_space"/>
              </td>
            </tr>
            <tr t:render="empty">
              <td colspan="5">You are not presently connected to any servers.</td>
            </tr>
          </table>


          <div class="row-fluid">
            <h2>Connected to <span t:render="connected_introducers" /> of <span t:render="total_introducers" /> introducers</h2>
          </div>

          <!-- table with introducers status -->
          <table class="table table-striped table-bordered peer-status" t:render="introducers_table">
            <thead>
              <tr t:pattern="header">
                <td><h3>Connection</h3></td>
                <td><h3>Last RX</h3></td>
              </tr>
            </thead>
            <tr t:render="item">
              <!-- Connection -->
              <td class="nickname-and-peerid">
                <div class="status-indicator">
                  <img>
                    <t:attr name="src">img/connected-<t:slot name="service_connection_status" />.png</t:attr>
                    <t:attr name="alt"><t:slot name="service_connection_status_alt" /></t:attr>
                  </img>
                </div>
                <a class="timestamp">
                  <t:attr name="title"><t:slot name="service_connection_status_abs_time"/></t:attr>
                  <t:slot name="service_connection_status_rel_time"/>
                </a>
                <div class="connection-status">
                  <t:attr name="title">
                    <t:slot name="details"/>
                  </t:attr>
                  <t:slot name="summary"/>
                </div>
              </td>
              <!-- Last RX -->
              <td class="service-last-received-data">
                <a class="timestamp">
                  <t:attr name="title"><t:slot name="last_received_data_abs_time"/></t:attr>
                  <t:slot name="last_received_data_rel_time"/>
                </a>
              </td>
            </tr>
            <tr t:render="empty">
              <td colspan="2">
                No introducers are configured.
              </td>
            </tr>
          </table>
        </div><!--/span-->
      </div><!--/row-->

      <hr/>

      <footer>
        <p>&#169; <a href="https://tahoe-lafs.org/">Tahoe-LAFS Software Foundation 2013-2020</a></p>
        <p class="minutia">Page rendered at <span t:render="rendered_at" /></p>
        <p class="minutia" t:render="version"></p>
        <p class="minutia">Tahoe-LAFS code imported from: <span t:render="import_path" /></p>
      </footer>

    </div><!--/.fluid-container-->
  </body>
</html>
